//go:build debug

package message

import (
	time "gitee.com/ameise84/e3time"
)

func init() {
	time.NewTick(&handler{}, nil, 2*time.Second, -1)
}

type handler struct {
}

func (t *handler) OnTimer(tr time.Timer, fireAt time.Time) {
	//logger.TracePrintf("message count:%d", _gReqCount.Load())
}

func TakeMessage() *Msg {
	_gMsgCount.Add(1)
	m := takeMessage()
	return m
}

func FreeMessage(m *Msg) {
	_gMsgCount.Add(-1)
	freeMessage(m)
}
